//
//  CCCollectionViewCellData.m
//  CKApp
//
//  Created by CC on 2020/9/8.
//  Copyright © 2020 This Moment. All rights reserved.
//

#import "LcFoundation.h"
#import "CCCollectionViewCellData.h"
#import "CCCollectionViewCell.h"

@implementation CCCollectionViewCellData

- (Class)cellClazz {
  NSString* className = NSStringFromClass(self.class);
  if ([className rangeOfString:@"CellData"].length != 0) {
    className = [className stringByReplacingOccurrencesOfString:@"CellData" withString:@"Cell"];
    return NSClassFromString(className);
  } else {
    LC_FAIL();
    return nil;
  }
}

- (NSString*)nibName {
  return NSStringFromClass(self.cellClazz);
}

- (void)refreshCell:(__kindof CCCollectionViewCell*)cell animated:(BOOL)animated {
  cell.cellData = self;
}

@end
